package com.crm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.crm.pojo.common.BaseProperties;
import com.crm.pojo.common.PageResult;
import com.crm.pojo.common.StatisticsResult;
import com.crm.pojo.domain.Contract;
import com.crm.pojo.dto.*;
import com.crm.pojo.vo.ContractDetailVo;
import com.crm.pojo.vo.SubjectStatisticsVo;
import org.springframework.web.bind.annotation.PathVariable;

import java.time.LocalDate;
import java.util.List;

public interface ContractService extends IService<Contract> {

    /**
     * 合同分页查询
     *
     * @param contractQueryDto
     * @return
     */
    PageResult pageQuery(ContractQueryDto contractQueryDto);

    /**
     * 获取合同详情
     *
     * @param id
     * @return
     */
    ContractDetailVo getContractDetail(Integer id);

    /**
     * 获取统计列表
     *
     * @param contractStatisticsListDto
     * @return
     */
    PageResult getContractStatisticsList(ContractStatisticsListDto contractStatisticsListDto);

    PageResult getDeptStatisticsList(String beginCreateTime, String endCreateTime, BaseProperties baseProperties);

    PageResult getCluesStatisticsList(CluesStatisticsDto cluesStatisticsDto);

    PageResult getActivityStatisticsList(ActivityStatisticsDto activityStatisticsDto);
    /**
     * 获取统计图数据
     *
     * @param beginCreateDate
     * @param endCreateDate
     * @return
     */
    StatisticsResult getContractStatistics(String beginCreateDate, String endCreateDate);

    List<SubjectStatisticsVo> getSubjectStatistics(String beginCreateDate, String endCreateDate);

    StatisticsResult getSalesStatistics(String beginCreateDate, String endCreateDate);

    StatisticsResult getCluesStatistics(String beginCreateDate, String endCreateDate);


    Object changeContract(Integer id,ContractQueryDto dto);
}
